﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace tpsmi1002
{
    public class Stock
    {
        private int idStock;
        private string companyName;
        private string symbol;
        private StockMarket stockMarket;

        public Stock() { }

        public Stock(int _idStock, string _companyName, string _symbol, StockMarket _stockMarket)
        {
            this.idStock = _idStock;
            this.companyName = _companyName;
            this.symbol = _symbol;
            this.stockMarket = _stockMarket;

            this.stockMarket.addStock(this);
        }

        public int IdStock
        {
            get { return this.idStock; }
        }

        public string CompanyName
        {
            get { return this.companyName; }
        }

        public string Symbol
        {
            get { return this.symbol; }
        }

        public StockMarket StockMarket
        {
            get { return this.stockMarket; }
        }
    }
}
